package com.lzx.user.feign;

import com.lzx.user.feign.dto.ArticleBrowseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * @author 程序员星星
 * @date 2023/2/8
 * @Description
 */
@Component
@FeignClient("five-cube-article")
public interface ArticleClient {
    //通过用户id获取用户浏览记录(提供给用户服务)
    @GetMapping("/article/browse/web/getArticleBrowseListToUser/{userId}")
    List<ArticleBrowseVO> getArticleBrowseListToUser(@PathVariable Long userId);

    //获取文章总数
    @GetMapping("/article/articles/web/getArticleTotal")
    Map<String, Integer> getArticleTotal();
}
